<?php 
	include_once getenv('DOCUMENT_ROOT')."/adodb5/adodb.inc.php";
		
	class Conexao {
		private $tipo;
		private $server;
		private $user;
		private $password;
		private $database;
		
		private static $instancia = null;
		
		public function __construct() {
			
			$this->tipo = "postgres";
			$this->server = "10.104.0.12";
			$this->user = "postgres";
			$this->password = "1234";
			$this->database = "evento";
		
		}

		public static function getInstancia(){
			if(self::$instancia == null){
				self::$instancia = new Conexao();
			}
			
			return self::$instancia;
		}
	
		public function adodbConexao() {
			
				$db = ADONewConnection($this->tipo);
				$db->Connect($this->server, $this->user, $this->password, $this->database);
					
			return $db;	
		}
				
	}

?>
